package config

import (
	"gitee.com/aurora-engine/web"
	"net/http"
)

func Cors() web.CorsHandle {
	corsOpt := web.NewDefaultCors()
	corsOpt.Domain(http.MethodPost, "/*")
	corsOpt.Domain(http.MethodGet, "/*")
	corsOpt.Domain(http.MethodDelete, "/*")
	corsOpt.Domain(http.MethodPut, "/*")
	return corsOpt.Handle()
}
